package com.yenlien.traceyun.control.entity;

import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 消息中心
 */
@Entity
@Table(name = "t_control_word")
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Word extends BaseEntity {

    @Column(name = "user_id")
    private String userId;

    @Column(name = "company_id")
    private String companyId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createtime;

    @Column(name = "caption", length = 50)
    private String caption;             //标题

    @Column(name = "Content", length = 1024)
    private String content;             //内容

    @Column(name = "reply", length = 240)
    private String reply;              //回复

}
